<template>
	<view class="container">
		<view style="text-align: center;font-size:48rpx;  margin: 60rpx;">一键Wi-Fi项目</view>
		<view style="margin-bottom: 60rpx;margin-top: -5rpx ; margin-left: 25rpx;">让每一次连接都能看到收益</view>
		</p>
		<uni-notice-bar @tap="wifitext" show-icon single text="点击查看操作步骤方式方法"  />

<!-- 		<button style="background-color: aquamarine;" >创建Wi-Fi</button>
		<button style="background-color: aquamarine;">管理Wi-Fi</button>
 -->

		<button class="button-yuanjiao" hover-class="bg-click" @tap="createwifi">创建Wi-Fi</button>
		<button class="button-yuanjiao" hover-class="bg-click"  @tap="managewifi">管理Wi-Fi</button>

		<view style="text-align: center;  margin: 80rpx;">长按加入群聊，一起探讨</view>

		<image class="official-img" style="margin: 0 auto; display:block;" show-menu-by-longpress="true"
			@click="previewImage" src="https://image.wolongyayun.top/2023-07-08wx.png">
		</image>
	</view>
</template>

<script>
	export default {
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {
			return{
				title:'拿下一座城躺赚一辈子',
				path:"pages/indexwifi/indexwifi",
				imageUrl:"https://image.wolongyayun.top/%E6%88%AA%E5%B1%8F2023-07-08%2022.27.23.png"
			}
		},
		onShareTimeline:function(){
			return{
				title:'拿下一座城躺赚一辈子',
				path:"pages/indexwifi/indexwifi",
			}
		},
		methods: {
			getMore() {
				uni.showToast({
					title: '点击查看更多',
					icon: 'none'
				})
			},
			previewImage(e) {
				uni.previewImage({
					// 需要预览的图片链接列表。若无需预览，可以注释urls
					// urls: [e.target.src],
					// 为当前显示图片的链接/索引值
					current: "https://image.wolongyayun.top/2023-07-08wx.png",
					// 图片指示器样式	
					indicator: 'default',
					// 是否可循环预览
					loop: false,
					// 长按图片显示操作菜单，如不填默认为保存相册
					longPressActions: {
						// itemList: [this.l('发送给朋友'), this.l]
					},
					success: res => {
						console.log('previewImage res', res);
					},
					fail: err => {
						console.log('previewImage err', err);
					}
				});
			},
			createwifi: function() {
				// console.log("aa")
				uni.navigateTo({
					url: "/subPackpages/createWifi/createWifi"
				})
			},
			wifitext: function() {
				// console.log("aa")
				uni.navigateTo({
					url: "/subPackpages/wifitext/wifitext"
				})
			},
			managewifi: function() {
				uni.navigateTo({
					url: "/subPackpages/wifi-list/wifi-list"
				})
			}
		}


	}
</script>
<style>
	@import "./indexwifi.css";
</style>
<style lang="scss">
	@mixin flex {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
	}

	@mixin height {
		/* #ifndef APP-NVUE */
		height: 100%;
		/* #endif */
		/* #ifdef APP-NVUE */
		flex: 1;
		/* #endif */
	}

	.box {
		@include flex;
	}

	.button {
		@include flex;
		align-items: center;
		justify-content: center;
		flex: 1;
		height: 35px;
		margin: 0 5px;
		border-radius: 5px;
	}

	.example-body {
		background-color: #fff;
		padding: 10px 0;
	}

	.button-text {
		color: #fff;
		font-size: 12px;
	}

	.popup-content {
		@include flex;
		align-items: center;
		justify-content: center;
		padding: 15px;
		height: 50px;
		background-color: #fff;
	}

	.popup-height {
		@include height;
		width: 200px;
	}

	.text {
		font-size: 12px;
		color: #333;
	}

	.popup-success {
		color: #fff;
		background-color: #e1f3d8;
	}

	.popup-warn {
		color: #fff;
		background-color: #faecd8;
	}

	.popup-error {
		color: #fff;
		background-color: #fde2e2;
	}

	.popup-info {
		color: #fff;
		background-color: #f2f6fc;
	}

	.success-text {
		color: #09bb07;
	}

	.warn-text {
		color: #e6a23c;
	}

	.error-text {
		color: #f56c6c;
	}

	.info-text {
		color: #909399;
	}

	.dialog,
	.share {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
	}

	.dialog-box {
		padding: 10px;
	}

	.dialog .button,
	.share .button {
		/* #ifndef APP-NVUE */
		width: 100%;
		/* #endif */
		margin: 0;
		margin-top: 10px;
		padding: 3px 0;
		flex: 1;
	}

	.dialog-text {
		font-size: 14px;
		color: #333;
	}
</style>

